CONTENTS | INDEX | PREV | NEXT
_exit
NAME
_exit - exit from a program without bother to release resources
SYNOPSIS
(void) _exit(code)
int code;
FUNCTION
exits the program and returns the specified exit code. Normally you
pass 0 to indicate no errors, a positive number to indicate a program
error to the parent. Note that since auto-init openned libraries
are closed in the startup module (c.o), automatically openned
libraries WILL be automatically closed for you. However, any
libraries you manually declare the library base variable for and
manually open must be closed by you.
You should only call _exit() if you used the _main() entry point
(instead of the usual main()), and then only after releasing all
resources (such as file handles openned with Open()).
EXAMPLE
/*
* This program comes to approximately a 552 byte executable
*/
_main()
{
Write(Output(), "OW!n", 4);
_exit(1);
}
SEE ALSO
main, _main, exit